import java.util.*;

/**
 * Created by qtbui on 2017/9/21.
 */


class Solution
{
    public void merge(int[] nums1, int m, int[] nums2, int n)
    {
        if(n>0)
        {
            System.arraycopy(nums2,0,nums1,m,n);
            Arrays.fill(nums1,m+n,nums1.length,2147483647);
            Arrays.sort(nums1);
        }
    }
}

public class test
{
    public static void main(String[] args)
    {
        int[] nums1=new int[]{1,2,3,0,0,0,0,0};
        int[] nums2=new int[]{2,3,4};
        new Solution().merge(nums1,3,null,0);
    }
}
